package com.xh.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.InputStream;
import java.util.Properties;

public class ADProperty {
    private static final Log log = LogFactory.getLog(ADProperty.class);

    public static String get(String InputV) {

        String getValue = "";
        ADProperty loadProp = new ADProperty();
        InputStream in = loadProp.getClass().getResourceAsStream("/ADConfig.properties");

        Properties prop = new Properties();

        try {
            prop.load(in);
            getValue = prop.getProperty(InputV);
        } catch (Exception e) {

            log.error("ADProperty IOException :" + e.getMessage());
        } finally {
            try {
                in.close();
            } catch (Exception e) {
                log.error("ADProperty IOException :", e);
            }
        }

        return getValue;
    }
}